<div class="main-content">
	<header>
    <a href="<?php echo bu('admin/programs/edit/'.$_GET['id']); ?>" class="fr button button-gray">Edit Info</a>
		<h2>Member Program - <?php echo $program->long_name; ?></h2>
  </header>

	<section>
    <?php echo $this->renderPartial('/partials/_notifications'); ?>
    <table class="datatable paginate sortable full">
			<thead>
			<tr>
				<th>ID</th>
				<th>
          <?php
            if($program->name == 'Activities'){
              echo 'Institution Name';
            }else{
              echo 'Email';
            }
          ?>
        </th>
				<th>Date Join</th>
				<th style="width:70px"></th>
			</tr>
			</thead>
			<tbody>
        <?php foreach($models as $model){ ?>
        <tr>
          <td align="center"><?php echo $model->id; ?></td>
          <td align="center">
            <a href="<?php echo bu("admin/programs/".$model->id.'?program='.$program->id); ?>" title="Show Member Info">
              <?php
                if($program->name == 'Activities'){
                  echo $model->institution_name;
                }else{
                  echo $model->email; 
                }
              ?>
            </a>
          </td>
          <td align="center"><?php echo $model->created_at; ?></td>
          <td>
            <ul class="action-buttons">
              <li><a href="<?php echo bu('admin/programs/delete'); ?>?id=<?php echo $model->id.'&&program='.$program->id; ?>" method="POST" class="button button-gray no-text"><span class="bin"></span>Delete</a></li>
            </ul>
          </td>
        </tr>
        <?php } ?>
      </tbody>
    </table>
	</section>
</div>